package route

/**
 * @title 用户路由
 *
 * @author wz
 *
 * @date 2025/10/23 14:13
 *
 * @version 1.0
 */

import (
	"github.com/gin-gonic/gin"
	"gorm.io/gorm"
	"test-gin/internal/controller"
)

func RegisterUserRoutes(r *gin.Engine, db *gorm.DB) {
	userController := controller.NewUserController(db)

	userRoutes := r.Group("/users")
	{
		userRoutes.POST("", userController.CreateUser)
		userRoutes.GET("/:id", userController.GetUser)
		// PUT、DELETE 等其他路由...
	}
}
